]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
magnifier: Update zoom region right after enabling the magnifier
authorJonas Dreßler <verdre@v0yd.nl>
Tue, 8 Mar 2022 11:55:00 +0000 (12:55 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sun, 13 Mar 2022 00:12:18 +0000 (00:12 +0000)
We want the zoom region to always be where the mouse cursor is, so make
sure to update it initially, too.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2234>

js/ui/magnifier.js

index 0585e8812e5c2b802c895ff1ea33a468ec4c8173..8ff062ba11aeb0d40fbb7e2643088fc7f464c8bb 100644 (file)
@@ -215,6 +215,8 @@ var Magnifier = class Magnifier {
         if (!this._pointerWatch) {
             let interval = 1000 / 60;
             this._pointerWatch = PointerWatcher.getPointerWatcher().addWatch(interval, this.scrollToMousePos.bind(this));
+
+            this.scrollToMousePos();
         }
     }